﻿@model Wabo.Dal.User

@{
    ViewBag.Title = String.Format(Messages.HeadingEditUser,Model.username);
}


@using(Html.BeginForm("Edit","User"))
{
    <fieldset>
        <legend>
            @ViewBag.Title
        </legend>
        @Html.LabelFor( x => x.username )
        @Html.TextBoxFor(x => x.username)
        @Html.ValidationMessageFor( x => x.username)   
        @Html.LabelFor( x => x.email )   
        @Html.TextBoxFor(x => x.email)
        @Html.ValidationMessageFor( x => x.email)   
        @Html.LabelFor( x => x.name )
        @Html.TextBoxFor(x=>x.name)
        @Html.LabelFor( x => x.last_name )
        @Html.TextBoxFor(x=>x.last_name)
        @Html.LabelFor( x => x.password )    
        @Html.PasswordFor(x => x.password)
        @Html.ValidationMessageFor( x => x.password)      
        <label class="checkbox">
            @Html.CheckBoxFor( x => x.locked)
            @Html.LabelFor( x => x.locked)
        </label>             
        <br/>
        <button type="submit" class="btn btn-primary">@Messages.ButtonUpdate</button>
        <a href="@Url.Action("Index","User")" class="btn">@Messages.ButtonCancel</a>    
    </fieldset>
}
